package com.jcfk.system.controller;

import com.jcfk.common.web.domain.RetResult;
import com.jcfk.system.domain.model.SendMsgModel;
import com.jcfk.system.service.SendMessageCenterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;


/**
 * 发送内部消息
 */
@RestController
@RequestMapping("/message")
public class SendCenterMessageController {


    @Autowired
    private SendMessageCenterService sendMessageCenterService;

    /**
     * 发送内部消息
     */
    @PostMapping("/send")
    public RetResult<?> send(@RequestBody @Validated SendMsgModel sendMsgModel) throws Exception {
        return RetResult.ok(sendMessageCenterService.sendMessage(sendMsgModel));
    }
}
